import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lyn
 * Date: 2025-01-13
 * Time: 18:36
 */
public class text {

    public static void main5(String[] args) {
        int a = 10;
        int b = 20;
        int ret = fun(a,b);
        double c = 3.3;
        double d = 2.2;
        double max = fun(c,d);
        System.out.println(ret);
        System.out.println(max);
    }
    public static double fun(double a,double b){
        return a>b?a:b;
    }
    public static int fun(int a,int b){
        return a>b?a:b;
    }
    //求斐波那契数列的第n项。(迭代实现)
    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        System.out.println(fub(n));
    }
    public static int fub(int n){
        int a = 0;
        if(n == 1)
            return 1;
        else if (n == 2)
            return 1;
        else
         a = (n - 1) + (n - 2);
            return a;
    }
    //求1！+2！+3！+4！+........+n!的和
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0;
        for (int i = 1; i <= n ; i++) {
            sum+=fun3(i);
        }
        System.out.println(n+"的阶乘和为："+sum);
    }
    public static int fun3(int n){
        int tmp = 1;
            for(int i = 1; i <= n; i++){
                tmp *= i;
            }
        return tmp;
    }
    //创建方法求两个数的最大值max2，随后再写一个求3个数的最大值的函数max3。要求：在max3这个函数中，调用max2函数，来实现3个数的最大值计算
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int f = scan.nextInt();
        System.out.println("最大值为："+fun2(fun1(n,m), f));
    }
    public static int fun1(int n,int m){
        if(n > m)
            return n;
        else
            return m;
    }
    public static int fun2(int fun1,int f){
        if(fun1 > f)
            return fun1;
        else
            return f;
    }
}
